package com.graduation.books_borrow.ret;

public class R {

    private int code;

    private String desc;

    private Object data;

    public static R ret(int code, String desc) {
        return ret(code, desc,null);
    }

    public static R ret(int code, String desc, Object data) {
        R r = new R(code, desc, data);
        return r;
    }

    private R(int code, String desc, Object data) {
        this.code = code;
        this.desc = desc;
        this.data = data;
    }

    @Override
    public String toString() {
        return "R{" +
                "code=" + code +
                ", desc='" + desc + '\'' +
                ", data=" + data +
                '}';
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
